/*
 * AutismGroup.java
 *
 * Created on March 16, 2007, 5:59 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.asaga.tools;

import java.util.*;

/**
 * properties and methods for an autism group
 * @author Jeremy Sanderlin
 */
public class AutismGroup implements Comparable<AutismGroup> {
    
    private int groupId;
    private String groupName;
    private String groupDescription;
    
    // All properties below this point are only used if object is not being
    // invoked through AutismGroupList.
    private boolean groupValidate;
    private String groupStatus;
    private int groupCreator;
    private TreeSet groupAdminList;
    private TreeSet groupMemberList;
    private TreeSet groupMessageList;
    private TreeSet groupEventList; // may not implement this
    
    /** Creates a new instance of AutismGroup */
    public AutismGroup() {
        this.groupId = -1;
        this.groupName = null;
        this.groupDescription = null;
        this.groupValidate = false;
        this.groupStatus = null;
        this.groupCreator = -1;
        this.groupAdminList = null;
        this.groupMemberList = null;
        this.groupMessageList = null;
        this.groupEventList = null;
    }
    
    /**
     * Constructor for creating a new instance of AutismGroup
     * @param gid int group Id
     * @param gn String group name
     * @param gd String group description
     */
    public AutismGroup(int gid, String gn, String gd){    
    
    }
    
    /**
     * Constructor for creating new instance of AutismGroup
     * @param gid group id
     * @param gn group name
     * @param gd group description
     * @param gv group validation
     * @param gs group status
     * @param gc group creator
     * @param gal group something
     * @param gml group something
     * @param gmsgl group something
     * @param gel group something
     */
    public AutismGroup(int gid,String gn,String gd,boolean gv,String gs,
            int gc,TreeSet gal,TreeSet gml,TreeSet gmsgl,TreeSet gel){
    
    }
    
    //Setters
    /**
     * sets the id in the object
     * @param gid group id
     */
    public void SetGroupId(int gid){this.groupId=gid;}
    /**
     * sets the group name on the object
     * @param gn group name
     */
    public void SetGroupName(String gn){this.groupName=gn;}
    /**
     * sets group description in object
     * @param gd group description
     */
    public void SetGroupDescription(String gd){this.groupDescription=gd;}
    /**
     * sets group validation true or false
     * @param gv true or false
     */
    public void SetGroupValidate(boolean gv){this.groupValidate=gv;}
    /**
     * sets the group status
     * @param gs group status
     */
    public void SetGroupStatus(String gs){this.groupStatus=gs;}
    /**
     * sets group creator
     * @param gc group creator
     */
    public void SetGroupCreator(int gc){this.groupCreator=gc;}
    /**
     * sets group admin list
     * @param gal admin list
     */
    public void SetGroupAdminList(TreeSet gal){this.groupAdminList=gal;}
    /**
     * sets group member list
     * @param gml member list
     */
    public void SetGroupMemberList(TreeSet gml){this.groupMemberList=gml;}
    /**
     * sets group message list
     * @param gmsgl group message list
     */
    public void SetGroupMessageList(TreeSet gmsgl){this.groupMessageList=gmsgl;}
    /**
     * set group event list
     * @param gel group event list
     */
    public void SetGroupEventList(TreeSet gel){this.groupEventList=gel;}
    //Getters
    /**
     * returns the group id
     * @return group id
     */
    public int GetGroupId(){return this.groupId;}
    /**
     * returns the group name
     * @return group name
     */
    public String GetGroupName(){return this.groupName;}
    /**
     * returns the group description
     * @return group description
     */
    public String GetGroupDescription(){return this.groupDescription;}
    /**
     * returns the group validation status
     * @return group validation status
     */
    public boolean GetGroupValidate(){return this.groupValidate;}
    /**
     * returns the group status
     * @return group status (suspended, active, etc)
     */
    public String GetGroupStatus(){return this.groupStatus;}
    /**
     * returns group creator
     * @return person id of the creator
     */
    public int GetGroupCreator(){return this.groupCreator;}
    /**
     * returns the list of group admins
     * @return group admin list
     */
    public TreeSet GetGroupAdminList(){return this.groupAdminList;}
    /**
     * returns a list of group members
     * @return group member list
     */
    public TreeSet GetGroupMemberList(){return  this.groupMemberList;}
    /**
     * returns a list of group messages
     * @return list of group messages
     */
    public TreeSet GetGroupMessageList(){return this.groupMessageList;}
    /**
     * returns a list of group events
     * @return list of group events
     */
    public TreeSet GetGroupEventList(){return this.groupEventList;}   
    
    /**
     * returns group id , group name, group descripion
     * @return group id , group name, group descripion
     */
    public String toString(){
        return this.groupId+":"+this.groupName+":"+this.groupDescription+"\n";
    }

    /**
     * overrides super.  allows for object to be placed into container classes
     * @param ag AutismGroup
     * @return difference between group id's
     */
    public int compareTo(AutismGroup ag) {
        int cmp = this.groupId - ag.groupId;
        return cmp;
    }
}
